package common

import (
	"os"
	"runtime"
)

type OsTools struct {
}

var _singleTon4OsTools *OsTools

//best
func GetOsTools() *OsTools {
	if _singleTon4OsTools == nil {
		once_sync.Do(func() {
			_singleTon4OsTools = &OsTools{}
		})
	}
	return _singleTon4OsTools
}

var ostype = runtime.GOOS

func (p *OsTools) GetProjectPath() string {
	var projectPath string
	projectPath, _ = os.Getwd()
	return projectPath
}

func (p *OsTools) GetFileSeperator() string {

	if ostype == "windows" {
		return "\\"
	} else if ostype == "linux" {
		return "/"
	}
	return "/"
}
